package top.tagao.m02_creationalPatterns.c_02_builder;

/**
 * 具体建造者(Concrete Builder）：PhoneBuilder
 * @author fu-xiao-liu
 * @Date 2022/7/24 18:22
 *
 */
public class CommonHouse extends HouseBuilder {
    protected House house ;
    private String baise;
    private String wall;
    private String roofed;

    public CommonHouse() {


    }

    @Override
    public HouseBuilder buildBasic(String baise) {
        this.baise = baise;
        return this;
    }

    @Override
    public HouseBuilder buildWalls(String wall) {
        this.wall = wall;
        return this;
    }

    @Override
    public HouseBuilder roofed(String roofed) {
        this.roofed = roofed;
        return this;
    }

    //建造房子好， 将产品(房子) 返回
    @Override
    public House buildHouse() {
        return  new House(baise,wall,roofed);

    }
}
